//
//  IndexPageInfo.m
//  Dolphin
//
//  Created by Handymood on 11-6-6.
//  Copyright 2011 __Hanydmood__. All rights reserved.
//

#import "IndexPageInfo.h"

@implementation IndexPageInfo

@synthesize grid_mode_on;
@synthesize bottom_line_mode_on;

@synthesize unit_width;
@synthesize unit_height;

@synthesize unit_width_iphone;
@synthesize unit_height_iphone;

@synthesize unit_between_width;
@synthesize unit_between_height;

@synthesize start_unit_offset_x;
@synthesize start_unit_offset_y;

@synthesize grid_column_num;
@synthesize grid_column_autoalign;
@synthesize unitArr;
@synthesize targetPageIdArr;
@synthesize unit_ratio_mode;

@synthesize  visible;

-(void) initDefaultSet
{
    grid_mode_on = FALSE;
    bottom_line_mode_on = FALSE;
    
    unit_width = 0;
    unit_height = 0;

    unit_width_iphone = 0;
    unit_height_iphone = 0;
    
    unit_between_width = 0;
    unit_between_height = 0;
    
    start_unit_offset_x = 0;
    start_unit_offset_y = 0;
    
    grid_column_num = 0;
    grid_column_autoalign = FALSE;
    unit_ratio_mode = 0;
    visible = TRUE;
}

-(void) toString
{
   NSLog(@"grid_mode_on:%d bottom_line_mode_on:%d unit_width:%f unit_height:%f grid_column_autoalign %d \n",(int)grid_mode_on,(int)bottom_line_mode_on,unit_width,unit_height,(int)grid_column_autoalign); 
    
    for (int i = 0; i<[unitArr count]; i++) 
    {
        NSLog(@"units link:%@",[unitArr objectAtIndex:i]);
    }
}

-(void) reset
{
    if(unitArr)
    {
        [unitArr removeAllObjects];
        [unitArr release];
    }
    
    if (targetPageIdArr) 
    {
        [targetPageIdArr removeAllObjects];
        [targetPageIdArr release];
    }
}

@end
